# 群主类
from python_test.person import Person


class Manager(Person):

    def send(self, num, price):
        red_list = []
        if price > self.balance:
            print("余额不足")
            return
        else:
            # 每个红包的为整数
            avg = price // num
            # 如果有余数获取余数
            mod = price % num
            for i in range(num):
                # 扣除金额
                self.balance -= price
                red_list.append(avg)
            red_list[-1] += mod
            return red_list







